package com.ktjy.test;

import com.ktjy.entity.Pet;
import com.ktjy.service.PetService;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    @Test
    public void test1(){
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        PetService petService=(PetService) context.getBean("petService");
        petService.save(new Pet());
    }
}
